package com.livesource.client.web.projectBacklog;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.MouseOverEvent;
import com.google.gwt.event.dom.client.MouseOverHandler;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.PopupPanel;
import com.livesource.client.LiveSourceGlobalVariables;
import com.livesource.client.model.entry.ProjectClass;
import com.livesource.client.web.projectBacklog.edit.FeatureForm;

/**
 * 
 * @UserInterface
 */
public class ButtonNewBacklog extends HTML {

	public static final String imageUnpressed = "<a href='#'><img src='images/add.gif'></a>";

	public PopupPanel addStoryHint;

	public ButtonNewBacklog() {

		this.setHTML(imageUnpressed);

		this.addClickHandler(new ClickHandler() {

			@Override
			public void onClick(ClickEvent event) {

				LiveSourceGlobalVariables.showPanel.clear();
				LiveSourceGlobalVariables.showPanel.add(new FeatureForm(
						new ProjectClass()));
			}
		});

		// addStoryHint = HelpHint.getHelpHintLinked("src."
		// + this.getClass().getName(),
		// internationalizationConstants.addNewStory(),
		// GlobalVariables.locale);

		this.addMouseOverHandler(new MouseOverHandler() {

			@Override
			public void onMouseOver(MouseOverEvent event) {

				// HelpHint.executeMouseOverHandler(event, addStoryHint, null);

			}
		});
	}
}
